#ifndef SDGRAPHICS_H
#define SDGRAPHICS_H

#ifdef __APPLE__
	#include "OpenGL/gl.h"
	#include "OpenGL/glu.h"
	#include <GLUT/glut.h>
#else
#ifdef WIN32
	#include <windows.h>
#endif
	#include <GL/gl.h>
	#include <GL/glu.h>
	#include <GL/glut.h>
#endif

#include <math.h>
#include <set>
#include "../src/chipmunk.h"
#include "sdUniverse.h"
#include "sdObject.h"
#include "sdTimed.h"
#include "sdShip.h"
#include <stdlib.h>

#define SLEEP_TICKS 16
#define HEIGHT 900
#define WIDTH 1200

class sdGraphics {
private:
    static sdUniverse* universe_;
    static void drawObject(void *ptr, void *unused);
    static void drawPolyShape(cpShape *shape, sdObject* object);
    static void drawSegmentShape(cpShape *shape, sdObject* object);
    static void drawCircleShape(cpShape *shape, sdObject* object);
    static void drawCircle(cpFloat x, cpFloat y, cpFloat r, cpFloat a);
    static void drawCollisions(void *ptr, void *data);
    static void timercall(int value);
    static void display();
    static void initGL();
    static void text(float x, float y, void *font, char *string);

public:
    static void init(sdUniverse* u, int width, int height, int argc, const char *argv[]);
};

#endif
